fix(restore): restore 9 deleted files from git history - #189
Conversation
Restored from previous commits: - src/lib/logPayloads.ts (from 39a6ba8) - src/shared/utils/apiKey.ts (from 78f09c8) - src/shared/constants/batchEndpoints.ts (from 2e68c0a) - src/shared/constants/modelCompat.ts (from 39a6ba8) - src/lib/api/errorResponse.ts (from 2e68c0a) - open-sse/utils/cors.ts (from 39a6ba8) - open-sse/services/wildcardRouter.ts (from 39a6ba8) - src/lib/db/reasoningCache.ts (from 39a6ba8) - src/lib/db/compressionCacheStats.ts (from 507842c) All files verified in git history and restored to current state. src/lib/combos/steps.ts already exists on main (not a deletion).
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reached
Next review available in: 45 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
Note
|
L17 Latency Budget ReportChecked against: budgets/rest-endpoints.yaml. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b5a6d8d3a9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| export function recordCacheStats(entry: CacheStatsEntry): void { | ||
| const db = getDbInstance(); | ||
|
|
||
| const sql = `INSERT INTO compression_cache_stats ( |
There was a problem hiding this comment.
Restore the compression_cache_stats schema
This restored DB module assumes compression_cache_stats already exists, but the commit does not restore a migration/table definition for it; checking src/lib/db/core.ts and src/lib/db/migrations shows no CREATE TABLE for this table. On a fresh or upgraded DB, the chat compression hook drops every stats write with no such table, and getCacheStatsSummary() callers such as the MCP compression tool can fail outright, so the matching migration needs to be restored with the module.
Useful? React with 👍 / 👎.
| `INSERT OR REPLACE INTO reasoning_cache | ||
| (tool_call_id, provider, model, reasoning, char_count, created_at, expires_at) | ||
| VALUES (?, ?, ?, ?, ?, datetime('now'), ?)` |
There was a problem hiding this comment.
Restore the reasoning_cache schema
This module now writes to reasoning_cache, but the current schema/migration set does not create that table; a repo search under src/lib/db/core.ts and src/lib/db/migrations finds references but no CREATE TABLE. In new deployments, setReasoningCache() throws and the service swallows it, leaving reasoning replay only in memory and making dashboard stats/entries empty after a restart, so the table migration needs to be restored as part of this change.
Useful? React with 👍 / 👎.
| message: typeof anyError?.message === "string" ? anyError.message : fallbackMessage, | ||
| type: anyError?.type, | ||
| details: anyError?.details, |
There was a problem hiding this comment.
Sanitize unknown errors before returning them
When routes catch an internal exception and call createErrorResponseFromUnknown() (for example the proxy/deploy settings routes), this path returns error.message and error.details verbatim to the client. For 5xx unknown errors those strings can contain stack frames, local paths, upstream response bodies, or credentials, so this helper should use the existing sanitized error body/message path or fall back to the supplied generic message instead of echoing raw exception fields.
Useful? React with 👍 / 👎.
|



Restored all missing files that were found in git history:
Restored (9 files):
Already present on main:
All files verified from commit history and restored to current state.